package com.allwees.bs.module.ops.service.impl;

import com.allwees.bs.module.base.service.impl.BoServiceImpl;
import com.allwees.bs.module.ops.dao.PointActiveDefDao;
import com.allwees.bs.module.ops.entity.PointActiveDef;
import com.allwees.bs.module.ops.req.PointActiveDefCrudReq;
import com.allwees.bs.module.ops.service.PointActiveDefService;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

/**
 * @author mouhaining
 * @since 2020-05-19 14:09
 */
@Service
public class PointActiveDefServiceImpl extends BoServiceImpl<PointActiveDefDao, PointActiveDef> implements PointActiveDefService {

    @Override
    public void save(PointActiveDefCrudReq req) {
        check(req);
        create(req.getBo());
    }

    @Override
    public void update(PointActiveDefCrudReq req) {
        Assert.hasLength(req.getBo().getUuid(), "uuid 不能为空");

        check(req);
        updateByUuid(req.getBo());
    }

    private void check(PointActiveDefCrudReq req) {
    }
}